<template>
    <div>
        <el-container>
            <el-aside>
                <myNzList msg="导航菜单" @getMsg=hemony :isCollapse="isCollapse"></myNzList>
                
            </el-aside>
            <el-container>
                <el-header>
                    <i class="el-icon-d-arrow-left" @click="isCollapse=!isCollapse"></i>
                    <a href="javascript:;" style="float: right; margin: 0px 30px;" @click="cancel">注销</a>
                    <span style="float: right">欢迎您：{{username}}</span>
                </el-header>

                <el-main>
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script>
import axios from 'axios'
import NzList from './layout/NzList'
export default {
    components:  {
        'myNzList': NzList
    },
    data() {
        return {
            isCollapse: false,
            username: sessionStorage.getItem('username')
        }
    },
    methods: {
        hemony(data) {
            alert(data)
        },
        cancel() {
            sessionStorage.clear()
        }
    },
    computed: {

    },
    created() {

    }
}
</script>

<style scoped>
.el-aside{
    background:#545c64;
    height: 700px;
    width: 200px
}
.el-header{
    line-height: 60px;
    background: #E4E7ED;
}
.el-main{
    background: #F2F6FC;
}
body{
    margin: 0px;
}
</style>
